#ifndef _L_COLLISION_RESULT_120104_H
#define _L_COLLISION_RESULT_120104_H

#include <ltypes.h>
#include <lmacros.h>
#include <ltriMesh.h>

#include <set>

LLIB_BEGIN
namespace collision {

/* The collector and processor of collision result */
class CollisionResult {
public:
    /* The default constructor */
    CollisionResult() {}

    /* Reset result */
    inline void Reset() { _collideSet.clear(); }

    /* Add a collision pair into set */
    inline void AddPair(geom::MeshFace& first, geom::MeshFace& second) { _collideSet.insert(first); _collideSet.insert(second); }

    /* Check whether a MeshFace is in collision state */
    inline Boolean CheckCollide(geom::MeshFace& face) { return _collideSet.find(face) != _collideSet.end(); }

private:
    /* We're using set of MeshFace* to store here */
    std::set<geom::MeshFace> _collideSet;

};


}
LLIB_END

#endif
